﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Wslzy.Auxiliary.Web.Domains.Models;

namespace Wslzy.Auxiliary.Web.Datas.SqlServer.Mappings.Systems
{
    public class AccountMap : Infrastructure.Datas.EF.SqlServer.EntityMap<Account>
    {
        protected override void MapTable(EntityTypeBuilder<Account> builder)
        {
            builder.ToTable("Account");
        }

        /// <summary>
        /// 映射属性
        /// </summary>
        protected override void MapProperties(EntityTypeBuilder<Account> builder)
        {
            builder.Property(t => t.Id).HasColumnName("Id");
            builder.HasQueryFilter(t => t.IsDeleted == false);
        }
    }
}
